In general, profiling is a way to analyze dynamic behavior of a computer program, e.g., for optimizing its performance or finding bugs or other problems. Profiling results can be used, e.g., to identify inefficient sections of programs, which can then be modified to operate faster or more optimally.
For accurate analysis, large amounts of profiling data should be gathered. Statistical profiling is one common approach to gather large amounts of data. In statistical profiling, the execution of the computer program is periodically stopped (e.g., based on a timer) to sample where the program is in its execution at that particular instant. By sampling thousands or millions of times, a statistically accurate view of the program execution can be reconstructed.
Typically, the profile data also referred to as “sampled data” or “statistical data” is processed for analysis and the analysis results are textually presented in a format that includes tables along with descriptive text. Such textual presentation can yield valuable information. However, such textual presentation can be limited in its ability to easily provide comprehensive views of the analysis. Information pieces often are presented individually and disconnected from each other, and the user is often left with the task of relating the presented pieces of information to one other.
Therefore, it desirable to visually and interactively manipulate profile data, including data based on measurements from computing devices such as video games, so that the analyzed information pieces may be displayed graphically in a way that correlates the data so that a comprehensive view is presented. To put it another way, it is desirable to transform the profile data so that the profile data can be visualized. The user, e.g., software developer, can receive accurate feedback allowing him or her to quickly determine potential areas of interest, e.g., functions, for further detailed analysis and for optimization opportunities.
An illustrative non-limiting implementation herein uses a technique in which detailed graphs of functions, i.e., function graphs, of a video game program based on the profile data of the program are graphically displayed and visually correlated to a list of functions, each of which is user selectable. This technique can visually and interactively manipulate the profile data so that the analyzed information pieces can be presented in ways that correlate to visually present a dynamic behavior of the video game program. As a non-limiting example, the correlation of impacts that individual functions have on the performance of the executing video game program can be presented visually.
Illustrative non-limiting method and apparatus for visually and interactively manipulating the profile data display a list of one or more functions of a video game program in a Functions List window. Each function in the Functions List window is selectable. For each selected function, a large-scale detailed graph, or simply “function graph”, of the selected function is displayed in a Function Graph window. The function graph includes a data line, which represents a graph of instantaneous performance of the function, and a highlight band which tracks the data line. A thickness of the highlight band represents a margin of error of the selected function. The highlight band is visually correlated to the selected function in the Functions List window.
A non-exhaustive list of non-limiting features include:                A list of all functions for which data is gathered is displayed in the Functions List window, each with a mini-graph of its performance over the duration of the profile data gathering. Each mini-graph effectively communicates many data points in a very small footprint, and emphasizes variation at low values and while still visualizing larger values. The mini-graphs offer a preview of the functions allowing the user to quickly determine which function or functions may be of interest.        The user can interactively select one or more functions from the Functions List window for display as detailed function graphs of performance in the Function Graph window, one for each selected function. Each function graph is displayed as combination of a data line loosely followed by a thicker highlight band. The data line is a graph of the function's instantaneous performance values. The thickness of the highlight band indicates the function's margin of error.        Color and/or pattern of each highlight band visually correlates the function being graphed with the selected function in the Functions List window.        Each highlight band follows a moving average or some other moving statistical representation of the function's data line. Smoothing is applied to the highlight band to minimize noise. Where the data line abruptly changes, the highlight band follows the data line very closely or even exactly so that the highlight band is on the data line. The smoothed highlight band improves the overall readability of the graph.        Within the Function Graph window, non-uniform scaling is permitted, e.g., zooming on the X-axis only.        
Within each zoom level, the analyzer graphically displays statistical attributes such as range, average, median, etc. for the portion of the data line currently being displayed within the Function Graph window.                The analyzer displays a graph related to instantaneous frame rate of the video game in a Frame Rate Graph window that corresponds 1:1 in time with the function graphs displayed in the Function Graph window. The graph of the instantaneous frame rate—which is a non-limiting example measure of the video game's performance—graphically depicts coincidences between the performance of any particular function and decrease/increase in the overall frame rate.        